const db = require('../../../libs/db.config');

module.exports = async (data) => {
    // const searchSQL = `SELECT * FROM user WHERE userName = "${username}"`;
    const searchSQL = 'update orders set state = ? where buyer = ? and orderID = ?';
    return await db.query(searchSQL, [data.state, data.buyer, data.orderID]);
};
